# basic makefile for D language - made by darkstalker
DCC = gdc
DFLAGS = -w
LIBS =
SRC = $(wildcard *.d)
OBJ = $(SRC:.d=.o)
OUT = $(shell basename `pwd`)

.PHONY: all debug release clean

all: debug

debug:   DFLAGS += -g -fdebug-c -Wall
release: DFLAGS += -frelease -fno-bounds-check -Wall

debug release: $(OUT)

$(OUT): $(OBJ)
	$(DCC) $(DFLAGS) $(OBJ) $(LIBS)

clean:
	rm -f *~ $(OBJ) $(OUT) trace.{def,log}

%.o: %.d
	$(DCC) $(DFLAGS) -c $< -o $@
